package design.demos.call.factory;

import design.demos.call.Call;
import design.demos.call.impl.AliYunHuCall;
import design.demos.call.impl.TianRunCall;

import java.util.HashMap;
import java.util.Map;

public class CallFactory{

    Map<String, Call> callMap = new HashMap<>();
    {
        callMap.put("1", new AliYunHuCall());
        callMap.put("2", new TianRunCall());
    }

    public Call getCall(String type){
        return callMap.get(type);
    }
}
